package actionListeners;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class MascaraMayusculakeyListener implements KeyListener  {

	@Override
	public void keyPressed(KeyEvent e) {
			
	}

	@Override
	public void keyReleased(KeyEvent e) {

		}

	@Override
	public void keyTyped(KeyEvent e) {
		 char caracter = e.getKeyChar();
	     // Verificar si la tecla pulsada no es un digito
	     if((caracter <= 122) &&  (caracter >= 97)){
		        //caracter-=32;  // ignorar el evento de teclado
		    	e.setKeyChar((char) (caracter-32));
		     }
	     else if((caracter== 164))
	    	 e.setKeyChar((char) (caracter+1));
	     else
	    	 e.setKeyChar(caracter);
		
	}



}